package schema

import "gorm.io/plugin/soft_delete"

type UserLoginToken struct {
	Id        int64                  `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT;comment:id" json:"id"`
	Sign      string                 `gorm:"column:sign;type:varchar(255);comment:登录唯一凭证;NOT NULL" json:"sign"`
	UserId    int64                  `gorm:"column:user_id;type:int(11);comment:用户id;NOT NULL" json:"user_id"`
	Source    string                 `gorm:"column:source;type:tinyint(4);default:0;comment:平台来源;NOT NULL" json:"surce"`
	Business  string                 `gorm:"column:business;type:varchar(50);comment:业务类型" json:"business"`
	CreatedAt int64                  `gorm:"column:created_at;type:bigint(20);comment:创建时间;NOT NULL" json:"created_at"`
	UpdatedAt int64                  `gorm:"column:updated_at;type:bigint(20);comment:更新时间" json:"updated_at"`
	DeletedAt *soft_delete.DeletedAt `gorm:"softDelete:deleted_at;column:deleted_at;type:bigint(20);NULL;default:null" json:"deletedAt"`
}

func (u UserLoginToken) TableName() string {
	return "user_login_token"
}
